Skip to content

58 task write trails drawing feature functions path optimality#93

Merged
cgmaiorano merged 10 commits into
mainfrom
58-task-write-trails-drawing-feature-functions-path_optimality
Jan 15, 2026
Merged

58 task write trails drawing feature functions path optimality#93
cgmaiorano merged 10 commits into
mainfrom
58-task-write-trails-drawing-feature-functions-path_optimality

Conversation

@cgmaiorano
Copy link
Copy Markdown
Collaborator

The path_optimality function will calculate the ratio between the optimal path distance and actual path distance. This function relies on predetermined circle locations of the presented stimulus.

@cgmaiorano cgmaiorano linked an issue Dec 9, 2025 that may be closed by this pull request
3 tasks
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.51%. Comparing base (59caf4e) to head (f4e6852).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
+ Coverage   98.49%   98.51%   +0.01%     
==========================================
  Files          18       18              
  Lines         998     1009      +11     
==========================================
+ Hits          983      994      +11     
  Misses         15       15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cgmaiorano cgmaiorano marked this pull request as ready for review December 9, 2025 15:29
@cgmaiorano
Copy link
Copy Markdown
Collaborator Author

cgmaiorano commented Dec 9, 2025

Also when reviewing keep in mind that this metric is calculated per segment, and is saved to class LineSegment. Average will be returned in final report.

Copy link
Copy Markdown
Collaborator

@Asanto32 Asanto32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small stylistic changes

Comment thread src/graphomotor/features/trails/drawing_metrics.py Outdated
Comment thread src/graphomotor/features/trails/drawing_metrics.py Outdated
Comment thread tests/unit/test_trails_drawing_metrics.py Outdated
Comment thread tests/unit/test_trails_drawing_metrics.py Outdated
Comment thread tests/unit/test_trails_drawing_metrics.py Outdated
@cgmaiorano cgmaiorano requested a review from Asanto32 January 14, 2026 16:29
Copy link
Copy Markdown
Collaborator

@Asanto32 Asanto32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
See minor comments about the specific values in tests

Comment thread tests/unit/test_models.py Outdated
start = models.CircleTarget(order=1, label="1", center_x=0, center_y=0, radius=1)
end = models.CircleTarget(order=2, label="2", center_x=10, center_y=0, radius=1)
expected_optimal_distance = 10 - 1 - 1
expected_path_optimality = expected_optimal_distance / 8
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you assing a var for the value 8 here? I assume it would be the same var/value used in models.LineSegment.distance below right?

Comment thread tests/unit/test_models.py
Comment thread tests/unit/test_models.py Outdated
@cgmaiorano cgmaiorano merged commit 704fce8 into main Jan 15, 2026
26 checks passed
@cgmaiorano cgmaiorano deleted the 58-task-write-trails-drawing-feature-functions-path_optimality branch January 15, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task: Write Trails Drawing Feature functions: path_optimality

2 participants